package com.rambo.androidnews.itemprovider;

import com.rambo.androidnews.ListTabBean;
import com.rambo.baselib.ResourceTable;
import com.rambo.baselib.provider.BaseViewHolder;
import com.rambo.baselib.provider.ListItemProvider;
import ohos.agp.utils.Color;
import ohos.app.Context;

import java.util.List;

/***********************************************************************
 * <p>@description: 外层的Tab
 * <p>@author: rambo
 * <p>@version: 1.0.0
 * <p>@created on: 2022/1/13 17:08
 **********************************************************************/
public class WanAdMainTabProvider extends ListItemProvider<ListTabBean, BaseViewHolder> {
    public WanAdMainTabProvider(Context context,  List<ListTabBean> data) {
        super(context, ResourceTable.Layout_componet_tab_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ListTabBean item, int position) {
        helper.setText(ResourceTable.Id_tv_tab,item.tabTitle)
                .setTextColor(ResourceTable.Id_tv_tab,item.select? item.selectedColor:item.normalColor);
    }
}
